#ifndef HELPERS_H_INCLUDED
#define HELPERS_H_INCLUDED

#include <ostream>

struct tagstr {
	int t;
	tagstr(int t): t(t) {};

	friend std::ostream& operator<<(std::ostream &out, const tagstr &f) {
		char *p = (char *)&f.t;
		if(p[3]) out << p[3];
		if(p[2]) out << p[2];
		if(p[1]) out << p[1];
		if(p[0]) out << p[0];

		return out;
	}
};

int ffs(unsigned int word);
int fls(unsigned int word);

#endif // HELPERS_H_INCLUDED
